package com.loanapp.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.loanapp.domain.LoanApplication;

public class LoanApplicationService {

	private static Log log = LogFactory.getLog(LoanApplicationService.class);

	private MessageSender messageSender = null;

	private MessageReceiver messageReceiver = null;

	public MessageSender getMessageSender() {
		return this.messageSender;
	}

	public void setMessageSender(MessageSender messageSender) {
		this.messageSender = messageSender;
	}

	public MessageReceiver getMessageReceiver() {
		return this.messageReceiver;
	}

	public void setMessageReceiver(MessageReceiver messageReceiver) {
		this.messageReceiver = messageReceiver;
	}

	public void sendAUSCreditRequest(LoanApplication loanApp) {
		log.debug("sendAUSCreditRequest called.");

		messageSender.send(loanApp);

		log.debug("Done sending the loan details to credit request.");
	}

}
